package 
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.events.KeyboardEvent;
	import flash.text.GridFitType;
	/**
	 * ...
	 * @author Miles Aurbeck
	 */
	public class Main extends Sprite 
	{
		public var triangleHeight:uint = 300;
		public var startY:int = 0;
		public var board:eIsoPaper_Grid = new eIsoPaper_Grid();
		
		public function Main():void 
		{
			addChild(board.gridMC);
			stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPress);
			
			//board.triArray[0].y += 100;
		}

		public function keyPress(evt:KeyboardEvent):void {
			trace("keyPress");
			/*
			 * (left)	 37
				0	 (up)	 38
				0	 (right)	 3
*/
			if(evt.keyCode == 37)
				board.faceType = "left";
			if(evt.keyCode == 38)
				board.faceType = "top";
			if(evt.keyCode == 39)
				board.faceType = "right";
			if(evt.keyCode == 81)
				board.faceColor = 0x000000;
			if(evt.keyCode == 87)
				board.faceColor = 0x00FFC0;
			if(evt.keyCode == 69)
				board.faceColor = 0xFFCCC0;
			if(evt.keyCode == 82)
				board.faceColor = 0xCC00FF;
				
		}

	}
	
}